<?php /*a:2:{s:63:"/www/wwwroot/cloud_boss/application/admin/view/login/index.html";i:1584974739;s:64:"/www/wwwroot/cloud_boss/application/admin/view/public/basic.html";i:1573743224;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title><?php echo htmlentities((isset($title) && ($title !== '')?$title:'重庆优合一众')); ?></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/static/plugs/layui/css/layui.css" media="all"/>
    <!--<link rel="stylesheet" href="/static/layuicms/css/index.css" media="all" />-->
    
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
      content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="/static/css/admin/login.css" media="all">
</head>

</head>
<body class="<?php echo htmlentities((isset($body) && ($body !== '')?$body:'childrenBody')); ?>">

<div class="finance-login" >
    <div class="layui-form-item login-part">
        <img src="/static/image/admin/login_back_corner.png" alt="" class="login-back-corner">
        <div class="login-left">
            <img src="/static/image/admin/login_back.png" alt="">
        </div>
        <div class="login-right">
            <div class="login-content-box">
                <div class="login-title">BOSS系统</div>
                <div class="login-one">
                    <img src="/static/image/admin/login_account.png" alt="" class="login-one-icon">
                    <input type="text" placeholder="请输入账号" class="login-one-input enterText" id="username" id="LAY-user-login-username" lay-verify="required">
                </div>
                <div class="login-one">
                    <img src="/static/image/admin/login_psw.png" alt="" class="login-one-icon">
                    <input type="password" placeholder="请输入密码" class="login-one-input enterText" id="password" id="LAY-user-login-password" lay-verify="required">
                </div>
                <div class="login-code-box">
                    <div class="login-one">
                        <img src="/static/image/admin/login_code.png" alt="" class="login-one-icon">
                        <input type="text" placeholder="验证码" class="login-one-input enterText" id="vercode" id="LAY-user-login-vercode" lay-verify="required">
                    </div>
                    <div class="login-code">
                        <!--<img src="../../images/code.jpg">-->
                        <img id="captcha" style="width:140px;height:45px;display: inline-block;float:right;" src="<?php echo captcha_src(); ?>" alt="captcha" onclick="this.src='<?php echo captcha_src(); ?>'"/>
                    </div>
                    <p class="change-code"><a href="#" id="replace">换一张</a></p>
                </div>
                <button class="layui-btn login-btn" id="submitBtn">登录</button>
            </div>
        </div>
    </div>
</div>
<div class="layui-trans layadmin-user-login-footer" style="color: #fff">
    <p><?php echo htmlentities((isset($SysInfo['FooterName']) && ($SysInfo['FooterName'] !== '')?$SysInfo['FooterName']:'')); ?> - <a href="<?php echo htmlentities((isset($SysInfo['BeianUrl']) && ($SysInfo['BeianUrl'] !== '')?$SysInfo['BeianUrl']:'')); ?>" target="_blank" style="color: #fff"><?php echo htmlentities((isset($SysInfo['Beian']) && ($SysInfo['Beian'] !== '')?$SysInfo['Beian']:'')); ?></a>
    </p>
</div>


<script type="text/javascript" src="/static/plugs/jquery/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="/static/plugs/layui/layui.js"></script>
<script type="text/javascript" src="/static/admin.js"></script>
<script type="text/javascript" src="/static/js/admin/api.js"></script>

<script>
    /**
     * 跳出ifram框架
     */
    if (top.location != self.location) top.location = self.location;

    /**
     * 登录
     */
    $("#submitBtn").click(function () {
        var data = {
            username: $("#username").val(),
            password: $("#password").val(),
            vercode: $("#vercode").val(),
        };
        $.request.post("<?php echo url('@admin/login'); ?>", data, function (res) {
            if (!window.localStorage) {
                $.msg.error('该浏览器不支持缓存模式');
            }
            if (res.code == 0) {
                console.log(res, "ress");
                localStorage.setItem('token', res.data);
            }
            $.msg.success(res.msg, function () {

                window.location.href = "<?php echo url('index'); ?>";
            })
        });
        return false;
    });
    $('.enterText').on('keydown', function (event) {
        if (event.keyCode == 13) {
            $("#submitBtn").click();
            return false
        }
    });
    // 换一张验证码
    $('.change-code').click(function(){
        $("#captcha").attr("src", "<?php echo captcha_src(); ?>");
    });


</script>

</body>
</html>